package com.ai.chat.socket;

import com.ai.chat.domain.base.request.BaseChatRequest;
import jakarta.servlet.http.HttpServletResponse;
import reactor.core.publisher.Flux;

/**
 * 聊天接口（非流式）
 */
public interface StreamChatSocket {
    /**
     * 聊天
     *
     * @param request 请求
     * @param response 响应
     * @return {@link String }
     */
    Flux<String> streamChat(BaseChatRequest request, HttpServletResponse response);

    /**
     * 释放流
     *
     * @param streamId 流id
     */
    void disposeStream(String streamId);
}
